package com.yutian.springbootwebflux.controller;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.regex.Pattern;


@ApiModel
public class CommonUploadFileReq {
    private final static Pattern pattern = Pattern.compile("[0-9a-z_/\\-]+");

    @ApiModelProperty(value = "0-内网；1-公网；2-公网cdn，见FdsParam。注意，cdn有缓存，默认1天，即修改不会立即生效！")
    private int level;

    @ApiModelProperty(value = "文件名，带后缀 优先 非必填")
    private String fileName;

    @ApiModelProperty(value = "文件保存目录，不包括bucket，只能包含小写字母横线斜线下划线和数字，如'test/h5/deploy/$CountryRegion' 必填")
    private String objectDir;

    @ApiModelProperty(value = "部署国家或地区 默认chn中国。注意，俄罗斯是rus")
    private String countryRegion;

    public static Pattern getPattern() {
        return pattern;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getObjectDir() {
        return objectDir;
    }

    public void setObjectDir(String objectDir) {
        this.objectDir = objectDir;
    }

    public String getCountryRegion() {
        return countryRegion;
    }

    public void setCountryRegion(String countryRegion) {
        this.countryRegion = countryRegion;
    }
}
